module rm {
	/**
	 * Create by richliu1023
	 * @date 2016-06-15
	 * @email richliu1023@gmail.com
	 * @github https://github.com/RichLiu1023
	 * @description a simple explanation
	 */
	export class ControllerBase {
		protected _autoUpdate:boolean = true;
		protected _target:egret3d.Object3D;
		protected _lookAtObject:egret3d.Object3D;
		protected _origin:egret3d.Vector3D = new egret3d.Vector3D( 0.0, 0.0, 0.0 );

		public constructor( targetObject:egret3d.Object3D = null, lookAtObject:egret3d.Object3D = null ) {
			this._target = targetObject;
			this._lookAtObject = lookAtObject;
		}

		/**
		 * @returns 返回当前的目标
		 */
		public get target():egret3d.Object3D {

			return this._target;
		}

		/**
		 * @param val 当前的目标
		 */
		public set target( val:egret3d.Object3D ) {

			if ( this._target == val )
				return;
			this._target = val;
		}

		protected  notifyUpdate() {
		}

		/**
		 * 数据更新
		 */
		public  update() {
			///throw null ;
		}

		get lookAtObject():egret3d.Object3D {
			return this._lookAtObject;
		}

		set lookAtObject( value:egret3d.Object3D ) {
			this._lookAtObject = value;
		}
	}
}